<?php if (is_plugin_enabled('poll')){ ?>
<div id="river_container2">
<div class="dash_pad">
<?php
   // Get the number of events to display
    $pollsToDisplay = get_plugin_setting('pollsToDisplay','riverdashboard');
        //$limit = 5;

        ?>
		<h3><?php echo elgg_echo("river:poll"); ?></h3>
<?php
		$polls = get_entities('object','poll',0,'time_created desc',$pollsToDisplay,$offset,false,0);
		
		$count = get_entities('object','poll',0,'time_created desc',999,0,true);
		
		
		set_context('search');
		
		$mypolls .= elgg_view_entity_list($polls,$count,$offset,$pollsToDisplay,false,false,false);
		echo $mypolls;
		

		
?>
<div align="right"><a href="<?php echo $vars['url']; ?>mod/poll/everyone.php"><?php echo elgg_echo("river:viewall"); ?></a></div>

</div></div>
<?php } ?>